package com.caisejingyu.whales.common.utils

import com.caisejingyu.whales.common.api.BaseResponse
import retrofit2.Call
import java.lang.Exception

/**
 * @author: xuxiaojie
 */
object RequestUtil {

    fun <T> call(a: Call<BaseResponse<T>>): T? {
        try {
            a.execute()?.body()?.result?.let {
                return it
            }
        } catch (e: Exception) { }
        return null
    }
}